/* 
 * Selling Partner API for Messaging
 *
 * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * OpenAPI spec version: v1
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */

using System;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;

namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Messaging
{
    /// <summary>
    /// The response schema for the GetAttributes operation.
    /// </summary>
    [DataContract]
    public partial class GetAttributesResponse :  IEquatable<GetAttributesResponse>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetAttributesResponse" /> class.
        /// </summary>
        /// <param name="buyer">The list of attributes related to the buyer..</param>
        /// <param name="errors">errors.</param>
        public GetAttributesResponse(Buyer buyer = default(Buyer), ErrorList errors = default(ErrorList))
        {
            this.Buyer = buyer;
            this.Errors = errors;
        }
        public GetAttributesResponse()
        {
            this.Buyer = default(Buyer);
            this.Errors = default(ErrorList);
        }
        /// <summary>
        /// The list of attributes related to the buyer.
        /// </summary>
        /// <value>The list of attributes related to the buyer.</value>
        [DataMember(Name="buyer", EmitDefaultValue=false)]
        public Buyer Buyer { get; set; }

        /// <summary>
        /// Gets or Sets Errors
        /// </summary>
        [DataMember(Name="errors", EmitDefaultValue=false)]
        public ErrorList Errors { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class GetAttributesResponse {\n");
            sb.Append("  Buyer: ").Append(Buyer).Append("\n");
            sb.Append("  Errors: ").Append(Errors).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }
  
        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return JsonConvert.SerializeObject(this, Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as GetAttributesResponse);
        }

        /// <summary>
        /// Returns true if GetAttributesResponse instances are equal
        /// </summary>
        /// <param name="input">Instance of GetAttributesResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetAttributesResponse input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.Buyer == input.Buyer ||
                    (this.Buyer != null &&
                    this.Buyer.Equals(input.Buyer))
                ) && 
                (
                    this.Errors == input.Errors ||
                    (this.Errors != null &&
                    this.Errors.Equals(input.Errors))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.Buyer != null)
                    hashCode = hashCode * 59 + this.Buyer.GetHashCode();
                if (this.Errors != null)
                    hashCode = hashCode * 59 + this.Errors.GetHashCode();
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
